package com.example.tally.frag_record;


import androidx.fragment.app.Fragment;
import com.example.tally.R;
import com.example.tally.db.DBManager;
import com.example.tally.db.TypeBean;

import java.util.List;

/**
 * A simple {@link Fragment} subclass.
 */
public class IncomeFragment extends BaseRecordFragment {

    // 重写父类方法
    @Override
    public void loadDataToGridView(){
        super.loadDataToGridView();
        List<TypeBean> inList = DBManager.getTypeList(1);
        typeBeanList.addAll(inList);
        typeBeanAdater.notifyDataSetChanged();
        typeTv.setText("其他");
        typeIv.setImageResource(R.mipmap.in_qt_fs);
    }

    @Override
    public void saveAccountToDb() {
        accountBean.setKind(1);
        DBManager.insertItemToAccounttb(accountBean);
    }

}